package com.sd.repay.service;

import com.sd.repay.common.CommonResult;
import com.sd.repay.common.Page;
import com.sd.repay.pojo.RepayPlan;
import com.sd.repay.pojo.RepayPlanDetail;

import java.util.List;
import java.util.Map;

/**
 * @author sd
 * @Description: 还款计划Service接口
 * @date 2017年10月25日
 */
public interface RepayPlanService {

    List<Map<String, String>> generateRepayPlan(String repayType, Map<String, String> map, List<Map<String, String>> detailMaps) throws Exception;

    RepayPlan getRepayPlanByBatchNo(String batchNo) throws Exception;

    RepayPlan getRepayPlanByBatchNoAndStatus(String batchNo, String status) throws Exception;

    List<RepayPlan> getAllToExecutePlans() throws Exception;

    int updateRepayPlanStatus(String batchNo, String newStatus, String oldStatus, String remark) throws Exception;

    List<RepayPlan> getRepayPlanByMerchantNo(String merchantNo) throws Exception;

    List<RepayPlan> getRepayPlanByCardNo(String cardNo) throws Exception;

    List<RepayPlan> getInExecutePlanByCardNo(String cardNo) throws Exception;

    CommonResult stopRepayPlan(String batchNo) throws Exception;

    int updatePlanExpectStatus(String batchNo, String expectStatus, String remark) throws Exception;

    Page<Map<String, Object>> getRepayPlanPage(String merchantNo, String status, String startTime, String endTime, int pageNo, int pageSize) throws Exception;

    List<RepayPlan> getAllCompletePlan() throws Exception;

    int settlePlanInfo(RepayPlan plan) throws Exception;

    CommonResult wakeRepayPlan(String batchNo, String operator) throws Exception;

    RepayPlanDetail getLatestHangPlanDetail(String batchNo) throws Exception;
}
